﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site/ElegantFood.master" AutoEventWireup="true"
	CodeFile="ShoppingCart.aspx.cs" Inherits="Site_ShoppingCart" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ProductHeading" runat="server">
	<h2>
		ទំនិញដែលអ្នកបានទិញដាក់ក្នុងកន្ត្រក</h2>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentElegantFood" runat="Server">
	<div class="col-md-12">
		<p>
			<asp:Label ID="ReportLabel" runat="server" />
			<asp:Label ID="statusLabel" runat="server" />
		</p>
		<asp:GridView ID="CartView" runat="server" AutoGenerateColumns="False" DataKeyNames="ProductID"
			OnRowDeleting="grid_RowDeleting" GridLines="None" CssClass="table table-hover table-striped">
			<Columns>
				<asp:BoundField DataField="Name" HeaderText="ឈ្មោះម្ហូប" ReadOnly="True" SortExpression="Name">
					<ControlStyle Width="100%" />
				</asp:BoundField>
				<asp:BoundField DataField="Price" DataFormatString="{0:c}" HeaderText="តម្លៃ" ReadOnly="True"
					SortExpression="Price" />
				<asp:TemplateField HeaderText="បរិមាណ">
					<ItemTemplate>
						<asp:TextBox ID="editQuantity" runat="server" CssClass="" Width="24px" MaxLength="2"
							Text='<%#Eval("Quantity")%>' />
					</ItemTemplate>
				</asp:TemplateField>
				<asp:BoundField DataField="Subtotal" DataFormatString="{0:c}" HeaderText="សរុប" ReadOnly="True"
					SortExpression="Subtotal" />
				<asp:ButtonField ButtonType="Button" CommandName="Delete" Text="លុប" ControlStyle-CssClass="btn btn-danger btn-xs">
				</asp:ButtonField>
			</Columns>
		</asp:GridView>
		<p align="right">
			<span>សរុបការចំណាយ: </span>
			<asp:Label ID="totalAmountLabel" runat="server" Text="Label" />
		</p>
		<p class="pull-right">
			<asp:HyperLink ID="gobackLink" CssClass="btn btn-primary btn-sm" runat="server" NavigateUrl="~/Default.aspx" Text="ត្រឡប់ទៅរើសទំនិញវិញ" />
			<asp:Button ID="updateButton" runat="server" Text="កែប្រែបរិមាណ" OnClick="updateButton_Click"
				CssClass="btn btn-success btn-sm" />
			<asp:HyperLink ID="checkoutButton" CssClass="btn btn-warning btn-sm" NavigateUrl="Site/CustomerCheckout.aspx" runat="server" Text="ដំណើរការការបញ្ជាទិញ" />
		</p>
	</div>
</asp:Content>
